import request from '@/utils/request'
//查询
export const suerinfoGetService = () => {
  return request.get('admingetuserinfo/search')
}
//更新
export const suerinfoUpService = ({
  id,
  name,
  phone,
  address,
  sex,
  age,
  avatar
}) => {
  return request.put('admin/upuserinfo', {
    id,
    name,
    phone,
    address,
    sex,
    age,
    avatar
  })
}
//添加用户信息
export const suerinfoAddService = ({
  id,
  name,
  password,
  phone,
  address,
  sex,
  age,
  avatar
}) => {
  return request.post('admin/adduserinfo', {
    id,
    name,
    password,
    phone,
    address,
    sex,
    age,
    avatar
  })
}
//删除
export const userinfoDlService = (id) => {
  return request.delete('admingetuserinfo/delete', {
    params: { id }
  })
}
